<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="as20941">ALTER OPERATOR CLASS</title><body><p id="sql_command_desc">Changes the definition of an operator class.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">ALTER OPERATOR CLASS <varname>name</varname> USING <varname>index_method</varname> RENAME TO <varname>new_name</varname>

ALTER OPERATOR CLASS <varname>name</varname> USING <varname>index_method</varname> OWNER TO <varname>new_owner</varname>

ALTER OPERATOR CLASS <varname>name</varname> USING <varname>index_method</varname> SET SCHEMA <varname>new_schema</varname></codeblock></section><section id="section3"><title>Description</title><p><codeph>ALTER OPERATOR CLASS</codeph> changes the definition of an operator
class. </p><p>You must own the operator class to use <codeph>ALTER OPERATOR CLASS</codeph>.
To alter the owner, you must also be a direct or indirect member of the
new owning role, and that role must have <codeph>CREATE</codeph> privilege
on the operator class's schema. (These restrictions enforce that altering
the owner does not do anything you could not do by dropping and recreating
the operator class. However, a superuser can alter ownership of any operator
class anyway.) </p></section><section id="section4"><title>Parameters</title><parml><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of an existing operator class.
</pd></plentry><plentry><pt><varname>index_method</varname></pt><pd>The name of the index method this operator class is for. </pd></plentry><plentry><pt><varname>new_name</varname></pt><pd>The new name of the operator class. </pd></plentry><plentry><pt><varname>new_owner</varname></pt><pd>The new owner of the operator class</pd></plentry>
<plentry>
  <pt><varname>new_schema</varname></pt>
  <pd>The new schema for the operator class.</pd>
</plentry></parml></section><section id="section5"><title>Compatibility</title><p>There is no <codeph>ALTER OPERATOR CLASS</codeph> statement in the SQL
standard. </p></section><section id="section6"><title>See Also</title><p><codeph><xref href="./CREATE_OPERATOR_CLASS.xml#topic1" type="topic" format="dita"/></codeph>,
            <codeph><xref href="./DROP_OPERATOR_CLASS.xml#topic1" type="topic" format="dita"
          /></codeph></p></section></body></topic>
